package cn.wx.scholar.neo4j.entity;

import java.util.ArrayList;
import java.util.List;
import org.apache.commons.lang.StringUtils;
import org.neo4j.ogm.annotation.NodeEntity;
import org.neo4j.ogm.annotation.Property;

import com.alibaba.fastjson.annotation.JSONField;

@NodeEntity(label="expert")
public class Expert extends Neo4jBaseEntity {
	
	private String authorsOrg;
	
	private Integer citations;
	
	@Property(name="h-index")
	private Integer hIndex;
	
	private String name;

	private Integer pnum;	//论文数量：期刊+会议
	
	private Integer bnum;	//图书数量
	
	private Integer cnum;	//会议数量
	
	private Integer jnum;	//期刊数量
	
	private Integer diversity;	//fos的数量
	
	private Double nIndex;
	
	private Integer gIndex;
	
	private Integer nnum;	//新闻数量
	
	private Integer snum;	//社交媒体数量
	
	private String email;	//email
	
	private String phone;
	
	private String address;
	
	private String country;
	
	private String position;
	
	private String language;
	
	private String relation;
	
	@Property(name="AIndex")
	private Double aIndex;


	@JSONField(serialize=false)
	private String fos;
	
	private List<Org> orgs;
	
	private Double pIndex;
	
	private List<String> orgsNames;
	
	private Integer patentsNum;	//专利数量
	
	private Integer patentsCit;	//专利被引用
	
	private Integer efpData;
	
	private Integer eqWorkData;
	
	private Integer eqWork4Data;
	
	private Double iIndex;
	
	private Double patentValue;
	
	private Double patentDegree;
	
	private String img;
	
	private Integer nInfluence;
	
	private Integer nPageRank;
	
	/**
	 * 被浏览的次数
	 */
	private Integer viewCou;
	
	public String getEmail() {
		return email;
	}

	public void setEmail(String email) {
		this.email = email;
	}

	public String getPhone() {
		return phone;
	}

	public void setPhone(String phone) {
		this.phone = phone;
	}

	public String getAddress() {
		return address;
	}

	public void setAddress(String address) {
		this.address = address;
	}

	public String getCountry() {
		return country;
	}

	public void setCountry(String country) {
		this.country = country;
	}

	public String getPosition() {
		return position;
	}

	public void setPosition(String position) {
		this.position = position;
	}

	public String getLanguage() {
		return language;
	}

	public void setLanguage(String language) {
		this.language = language;
	}

	public Integer getNnum() {
		return nnum == null ? 0: nnum;
	}

	public void setNnum(Integer nnum) {
		this.nnum = nnum;
	}

	public Integer getSnum() {
		return snum == null ? 0: snum;
	}

	public void setSnum(Integer snum) {
		this.snum = snum;
	}

	public Integer getgIndex() {
		return gIndex == null ? 0: gIndex;
	}

	public void setgIndex(Integer gIndex) {
		this.gIndex = gIndex;
	}

	public Double getnIndex() {
		return nIndex == null ? 0 : nIndex;
	}

	public void setnIndex(Double nIndex) {
		this.nIndex = nIndex;
	}

	public Integer getDiversity() {
		return diversity;
	}

	public void setDiversity(Integer diversity) {
		this.diversity = diversity;
	}

	public Integer getJnum() {
		return jnum == null ? 0: jnum;
	}

	public void setJnum(Integer jnum) {
		this.jnum = jnum;
	}

	public Integer getCnum() {
		return cnum == null ? 0: cnum;
	}

	public void setCnum(Integer cnum) {
		this.cnum = cnum;
	}

	public Double getaIndex() {
		return aIndex == null ? 0 : aIndex;
	}

	public void setaIndex(Double aIndex) {
		this.aIndex = aIndex;
	}

	public String getRelation() {
		return relation;
	}

	public void setRelation(String relation) {
		this.relation = relation;
	}

	public Integer getBnum() {
		return bnum == null ? 0: bnum;
	}

	public void setBnum(Integer bnum) {
		this.bnum = bnum;
	}

	public Integer getPnum() {
		return pnum == null ? 0: pnum;
	}

	public void setPnum(Integer pnum) {
		this.pnum = pnum;
	}

	public String getImg() {
		StringBuffer sb = new StringBuffer("/images/head/");
		sb.append(this.img).append("/").append(this.getfId()).append(".jpg");
		return sb.toString();
	}

	public String getAuthorsOrg() {
		return authorsOrg;
	}

	public void setAuthorsOrg(String authorsOrg) {
		this.authorsOrg = authorsOrg;
	}
	
	public Integer getCitations() {
		return citations == null ? 0 : citations;
	}

	public void setCitations(Integer citations) {
		this.citations = citations;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public Integer gethIndex() {
		return hIndex == null ? 0: hIndex;
	}

	public void sethIndex(Integer hIndex) {
		this.hIndex = hIndex;
	}

	public String getFos() {
		return fos;
	}

	public void setFos(String fos) {
		this.fos = fos;
	}
	
	public Double getpIndex() {
		return pIndex == null ? 0 : pIndex;
	}

	public List<Org> getOrgs() {
		return orgs;
	}

	public void setOrgs(List<Org> orgs) {
		this.orgs = orgs;
	}

	public void setpIndex(Double pIndex) {
		this.pIndex = pIndex;
	}
	
	public List<String> getOrgsNames() {
		return orgsNames;
	}

	public void setOrgsNames(List<String> orgsNames) {
		this.orgsNames = orgsNames;
	}

	public Integer getPatentsNum() {
		return patentsNum == null ? 0: patentsNum;
	}

	public void setPatentsNum(Integer patentsNum) {
		this.patentsNum = patentsNum;
	}

	public Integer getPatentsCit() {
		return patentsCit == null ? 0: patentsCit;
	}

	public void setPatentsCit(Integer patentsCit) {
		this.patentsCit = patentsCit;
	}

	public Integer getEfpData() {
		return efpData == null ? 0 : efpData;
	}

	public void setEfpData(Integer efpData) {
		this.efpData = efpData;
	}

	public Integer getEqWorkData() {
		return eqWorkData == null ? 0 : eqWorkData;
	}

	public void setEqWorkData(Integer eqWorkData) {
		this.eqWorkData = eqWorkData;
	}

	public Integer getEqWork4Data() {
		return eqWork4Data == null ? 0 : eqWork4Data;
	}

	public void setEqWork4Data(Integer eqWork4Data) {
		this.eqWork4Data = eqWork4Data;
	}

	public Double getiIndex() {
		return iIndex == null ? 0 : iIndex;
	}

	public void setiIndex(Double iIndex) {
		this.iIndex = iIndex;
	}
	
	public Double getPatentValue() {
		return patentValue == null ? 0 : patentValue;
	}

	public void setPatentValue(Double patentValue) {
		this.patentValue = patentValue;
	}

	public Double getPatentDegree() {
		return patentDegree == null ? 0 : patentDegree;
	}

	public void setPatentDegree(Double patentDegree) {
		this.patentDegree = patentDegree;
	}

	public void setImg(String img) {
		this.img = img;
	}

	public List<String> getFoSets() {
		return getFoSets_();
	}

	public Integer getnInfluence() {
		return nInfluence == null ? 0 : nInfluence;
	}

	public void setnInfluence(Integer nInfluence) {
		this.nInfluence = nInfluence;
	}

	public Integer getnPageRank() {
		return nPageRank == null ? 0 : nPageRank;
	}

	public void setnPageRank(Integer nPageRank) {
		this.nPageRank = nPageRank;
	}

	public Integer getViewCou() {
		return viewCou;
	}

	public void setViewCou(Integer viewCou) {
		this.viewCou = viewCou;
	}

	@JSONField(serialize=false)
	public List<String> getFoSets_() {
		
		if(StringUtils.isBlank(this.fos)) {
			return new ArrayList<>();
		}
		String[] foSets_ = this.fos.split(",");
		List<String> f1 = new ArrayList<>();
		for(String fs : foSets_) {
			String fs_ = fs.replaceAll("___", " ");
			f1.add(fs_);
		}
		return f1;
	}

}
